"""
-*- coding:utf-8 -*-
__project_ = '海媛的Python练习'
__file_name__ = '剪刀石头布中文'
__author__ = 'lenovo'
__time__ = '2020/12/3 15:31'
__product_name = PyCharm
# code is far away from bugs with the god animal protecting
    I love animals. They taste delicious.
              ┏┓      ┏┓
            ┏┛┻━━━┛┻┓
            ┃        ┃
            ┃  ┳┛  ┗┳  ┃
            ┃      ┻      ┃
            ┗━┓      ┏━┛
                ┃      ┗━━━┓
                ┃  神兽保佑    ┣┓
                ┃　永无BUG！   ┏┛
                ┗┓┓┏━┳┓┏┛
                  ┃┫┫  ┃┫┫
                  ┗┻┛  ┗┻┛
"""
import random
my_list = ["剪刀", "石头", "布"]
rule = [["布", "石头"], ["石头", "剪刀"],["剪刀", "布"]]
while True:
    computer = random.choice(my_list)
    people = input('请输入：石头、剪刀、布\n')
    if people not in my_list:
        people = input('输入不符合规则，请重新输入：石头、剪刀、布\n')
        continue
    if computer == people:
        print('computer:', computer)
        print("平手，再玩一次！！！")
    elif [computer, people] in rule:
        print('computer:', computer)
        print("电脑获胜！！！！")
    else:
        print('computer:', computer)
        print("人获胜!!!!")
        break



